package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TrafficInfoMapper;
import com.ruoyi.system.domain.TrafficInfo;
import com.ruoyi.system.service.ITrafficInfoService;

/**
 * 交通信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-24
 */
@Service
public class TrafficInfoServiceImpl implements ITrafficInfoService 
{
    @Autowired
    private TrafficInfoMapper trafficInfoMapper;

    /**
     * 查询交通信息
     * 
     * @param trafficId 交通信息主键
     * @return 交通信息
     */
    @Override
    public TrafficInfo selectTrafficInfoByTrafficId(Long trafficId)
    {
        return trafficInfoMapper.selectTrafficInfoByTrafficId(trafficId);
    }

    /**
     * 查询交通信息列表
     * 
     * @param trafficInfo 交通信息
     * @return 交通信息
     */
    @Override
    public List<TrafficInfo> selectTrafficInfoList(TrafficInfo trafficInfo)
    {
        return trafficInfoMapper.selectTrafficInfoList(trafficInfo);
    }

    /**
     * 新增交通信息
     * 
     * @param trafficInfo 交通信息
     * @return 结果
     */
    @Override
    public int insertTrafficInfo(TrafficInfo trafficInfo)
    {
        return trafficInfoMapper.insertTrafficInfo(trafficInfo);
    }

    /**
     * 修改交通信息
     * 
     * @param trafficInfo 交通信息
     * @return 结果
     */
    @Override
    public int updateTrafficInfo(TrafficInfo trafficInfo)
    {
        return trafficInfoMapper.updateTrafficInfo(trafficInfo);
    }

    /**
     * 批量删除交通信息
     * 
     * @param trafficIds 需要删除的交通信息主键
     * @return 结果
     */
    @Override
    public int deleteTrafficInfoByTrafficIds(Long[] trafficIds)
    {
        return trafficInfoMapper.deleteTrafficInfoByTrafficIds(trafficIds);
    }

    /**
     * 删除交通信息信息
     * 
     * @param trafficId 交通信息主键
     * @return 结果
     */
    @Override
    public int deleteTrafficInfoByTrafficId(Long trafficId)
    {
        return trafficInfoMapper.deleteTrafficInfoByTrafficId(trafficId);
    }
}
